<!-- 管理学生报名信息 -->
<template>
	<view class="container">
		<view class="c-cell" @click="toMineSignUpInfo">
			<ul>
				<li v-for="item in gameList" :key="item.id" :data-name="item.name">{{item.name}}</li>
			</ul>
		</view>
		<view class="c-empty" v-if="gameList.length==0">
			<u-empty icon="/static/empty/list.png" text="暂无赛事信息" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name: "",
		data() {
			return {
				gameList: [],
				query: {
					page: 1,
					page_size: 20,
					
				}
			}
		},
		onLoad() {
			this.getGameList()
		},
		onReachBottom() {
			this.query.page += 1
			this.getGameList()
		},
		methods: {
			// 获取比赛列表
			getGameList() {
				this.$http.getGameList({from:'usercenter'}).then(res => {
					this.gameList = res
				})
			},
			// 跳转查询赛事获奖学生列表
			toMineSignUpInfo(e) {
				if (e.target.dataset.name) {
					this.navigateTo("/pages/pages_mine/studentAwards?name=" + e.target.dataset.name)
					// this.navigateTo("teacherStudentSignUpList?name=" + e.target.dataset.name)
				}
			},
		}
	}
</script>

<style scoped lang="scss">
	.container {
		ul {
			width: 100%;

			li {
				width: 100%;
				padding: 45rpx;
				margin-bottom: 15rpx;
				background-color: #fff;
			}
		}
	}
</style>